package com.zjff.mobiletwo.service;

import com.zjff.mobiletwo.entity.ResultEntity;
import com.zjff.mobiletwo.dao.InformationDao;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class InformationService {
    @Resource
    InformationDao InformationDao;
    private static final Logger logger = LoggerFactory.getLogger(InformationService.class);

    /**
     * 获取新闻信息
     * @return
     */
    public String getInformationList(){
        try{
            return ResultEntity.Success(null,InformationDao.getInformationList(),0,"获取成功!");
        }catch (Exception e){
            logger.error(e.getMessage());
            e.printStackTrace();
            return ResultEntity.Fail(-10007,"上传失败!");
        }
    }
}
